{% extends "common/layout.html" %}
{% block content %}
    <style>
        /*web background*/
        .container {
            display: table;
            height: 100%;
        }

        .row {
            display: table-cell;
            vertical-align: middle;
        }

        /* centered columns styles */
        .row-centered {
            text-align: center;
        }

        .col-centered {
            display: inline-block;
            float: none;
            text-align: left;
            margin-right: -4px;
        }
    </style>

    <div class="container">
        <div class="row row-centered">
            <div class="well col-md-8 col-centered ">
                <h2 class="row-centered">请登录</h2>
                <div class="card" style="margin-top: 20px">
                    <div class="card-body">
                        <div class="panel-body">
                            <div class="form-horizontal upload_wrap">
                                <div class="form-group">
                                    <div class="col-sm-12">
                                        <p>旧ERP文件上传成功，请填写采购组织与采购员信息</p>
                                        <div class='col-sm-12'>
                                            <div class="form-group">
                                                <label for="exampleInputEmail1" class="form-label">请选择采购组织:</label>
                                                <div class="col-sm-12">
                                                    <select type="text" class="form-control" id="company" name="company"
                                                    >
                                                        <option>请选择</option>
                                                        <option>东杰智能科技集团股份有限公司</option>
                                                        <option>东杰智能科技集团股份有限公司不锈钢园区分公司</option>
                                                        <option>太原东杰装备有限公司</option>
                                                    </select>
                                                </div>
                                            </div>

                                            <div class="form-group" style="margin-top: 20px">
                                                <label for="exampleInputEmail1" class="form-label">请选择采购员:</label>
                                                <div class="col-sm-12">
                                                    <select type="text" class="form-control" id="user" name="user"
                                                    >
                                                        <option>请选择</option>
                                                        <option>张翼凤</option>
                                                        <option>赵军旗</option>
                                                        <option>许小玲</option>
                                                        <option>宋学强</option>
                                                        <option>姜浩文</option>
                                                        <option>秦子慧</option>
                                                        <option>闫于海</option>
                                                        <option>董琴</option>
                                                        <option>刘文</option>
                                                        <option>魏宗林</option>
                                                        <option>王有明</option>
                                                        <option>陈东跃</option>
                                                    </select>
                                                </div>
                                            </div>

                                            <div class="form-group" style="margin-top: 20px">
                                                <button type="submit"
                                                        class="btn btn-success btn-sm btn-block do-exportly "
                                                        id="doexportly">
                                                    转换并下载表格
                                                </button>
                                            </div>

                                            <script type="text/javascript">
                                                var exporterly = {
                                                    init: function () {
                                                        this.eventBind()
                                                    },
                                                    eventBind: function () {
                                                        $(".do-exportly").click(function () {
                                                            var company = $(".upload_wrap select[name=company]").val();
                                                            var user = $(".upload_wrap select[name=user]").val();
                                                            var urlindex = common_ops.buildUrl("/upload/api_upload_input_cgsq?user=") + user + "&company=" + company;
                                                            document.location.href = urlindex;
                                                        });
                                                    }
                                                };
                                                $(document).ready(function () {
                                                    exporterly.init();
                                                });

                                            </script>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

{% endblock %}

{% block js %}


{% endblock %}